<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <ui:include src="header.xhtml" />
        <ui:insert name="head" />
    </h:head>
    <h:body>
        <ui:include src="exception.xhtml"/>
        <ui:include src="loader.xhtml"/>
        <ui:include src="profile.xhtml"/>
        <ui:include src="changePassword.xhtml"/>

        <p:outputPanel rendered="#{sessionController.usuarioLogado != null}">
            <ui:include src="menuBar.xhtml"/>
            <p:growl id="msg" showDetail="true" sticky="true" autoUpdate="true" />
            <div class="container">
                <div class="content">
                    <div class="row">
                        <div class="span3 bs-docs-sidebar">
                            <ui:include src="navBar.xhtml"/>
                        </div>
                        <div class="span9">
                            <ui:insert name="body"/>
                        </div>
                    </div>
                </div>
            </div>
            <ui:include src="footer.xhtml"/>
        </p:outputPanel>

        <p:outputPanel rendered="#{sessionController.usuarioLogado == null}">
            <form id="form-sessionClosed"
                  name="form-sessionClosed"
                  action="/EHomeWebApplication/login.jsf"
                  method="post">
                <script>
                    $(document).ready(function() {
                        returnLogin();
                    });
                </script>
            </form>
        </p:outputPanel>
    </h:body>
</html>